import commonjs from '@rollup/plugin-commonjs'
import {nodeResolve} from '@rollup/plugin-node-resolve'
import {uglify} from 'rollup-plugin-uglify'

const pkg = {
  browser: 'dist/browser.js',
  main: 'dist/main.js',
  module: 'dist/module.js'
}

export default {
  input: 'index.js',
  plugins: [
    commonjs(),
    nodeResolve(),
  ],

  output: [
    {
      file: pkg.main,
      format: 'cjs'
    },
    {
      file: pkg.module,
      name:'cdd_lib',
      format: 'umd',
    },
    {
      file: pkg.browser,
      name: 'cdd_lib',
      format: 'iife'
    }
  ]
}
